package com.hzspace.es;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Mapping;

/**
 * TODO
 *
 * @Version 1.0
 * @Author hz
 * @Date 2020/11/25 18:01
 */
@Data
@Document(indexName = "test", type = "article", shards = 1, replicas = 1)
public class Article {

    @Id
    private Integer id;
    @Field(type = FieldType.Text, analyzer = "ik_smart")
    private String title;
    @Field(type = FieldType.Text, analyzer = "ik_max_word")
    private String content;
}

